package model.characters;

import java.awt.Rectangle;
import java.util.List;

import model.ComponentTypeEnum;
import model.LayerEnum;
import model.characters.weapons.Weapon;

public abstract class CharacterDecorator implements CharacterInterface{
	
	protected CharacterInterface character;
	
	public CharacterDecorator(CharacterInterface player) {
		this.character = player;
	}

	@Override
	public Rectangle getRegion() {
		return character.getRegion();
	}

	@Override
	public CharacterStateEnum getState() {
		return character.getState();
	}
	
	@Override
	public void setState(CharacterStateEnum state) {
		this.character.setState(state);
	}

	@Override
	public void walk(Integer direction) {
		character.setStateCode(CharacterState.WALKING * character.getDirection());
		character.walk(direction);
	}

	@Override
	public void run(Integer direction) {
		character.setStateCode(CharacterState.RUNNING * character.getDirection());
		character.run(direction);
	}
	
	@Override
	public void fall(Integer direction) {
		character.fall(direction);
	}

	@Override
	public void jump() {
		character.jump();
	}

	@Override
	public void turnDown() {
		character.turnDown();
	}

	@Override
	public List<Weapon> getWeapons() {
		return character.getWeapons();
	}

	@Override
	public Weapon getCurrentWeapon() {
		return character.getCurrentWeapon();
	}

	@Override
	public Integer getLife() {
		return character.getLife();
	}

	@Override
	public void setWalkingR(boolean walkingR) {
		character.setWalkingR(walkingR);
	}
	
	@Override
	public void setLife(Integer life) {
		character.setLife(life);
		
	}
	
	@Override
	public void setWalkingL(boolean walkingL) {
		character.setWalkingL(walkingL);
	}

	@Override
	public void setRunning(boolean running) {
		character.setRunning(running);
		
	}

	@Override
	public void setShooting(boolean shooting) {
		character.setShooting(shooting);
		
	}

	@Override
	public void setDirection(Integer direction) {
		character.setDirection(direction);
		
	}
	
	@Override
	public void setFalling(boolean falling){
		character.setFalling(falling);
	}
	
	@Override
	public Integer getDirection(){
		return character.getDirection();
	}
	
	@Override
	public void setJumping(boolean jumping) {
		character.setJumping(jumping);	
	}
	
	@Override
	public void setRightDirection(int rigthDirection) {
		character.setRightDirection(rigthDirection);
	}
	
	@Override
	public void setLeftDirection(int leftDirection) {
		character.setLeftDirection(leftDirection);
	}
	
	@Override
	public boolean isWalkingR() {
		return character.isWalkingR();
	}
	@Override
	public boolean isWalkingL() {
		return character.isWalkingL();
	}
	@Override
	public int getRightDirection() {
		return character.getRightDirection();
	}
	@Override
	public int getLeftDirection() {
		return character.getLeftDirection();
	}
	@Override
	public boolean isRunning() {
		return character.isRunning();
	}
	@Override
	public Rectangle getHand() {
		return character.getHand();
	}
	
	@Override
	public void die() {
		character.die();
	}
	
	@Override
	public void turnUp() {
		character.turnUp();
		
	}
	
	@Override
	public boolean isLowered() {
		return character.isLowered();
	}
	
	@Override
	public void setLowered(boolean lowered) {
		character.setLowered(lowered);
	}
	
	public void setCurrentWeapon(Weapon currentWeapon) {
		character.setCurrentWeapon(currentWeapon);
	}
	
	@Override
	public LayerEnum getLayer(){
		return character.getLayer();
	}
	
	@Override
	public ComponentTypeEnum getType() {
		return character.getType();
	}
	
	@Override
	public boolean isDead() {
		return character.isDead();
	}
	
	@Override
	public int getStateCode() {
		return character.getStateCode();
	}

	@Override
	public void setStateCode(Integer stateCode) {
		character.setStateCode(stateCode);
	}
	
	@Override
	public boolean isJumping() {
		return character.isJumping();
	}

	@Override
	public boolean isShooting() {
		return character.isShooting();
	}
	
	@Override
	public boolean isFalling() {
		return character.isFalling();
	}
	
	@Override
	public boolean isWalking() {
		return character.isWalking();
	}

	@Override
	public void setWalking(boolean walking) {
		character.setWalking(walking);
	}	
	
}
